import collections
class Solution(object):
    def canConstruct(self, s, k):
        d = collections.Counter(s)
        max_val = len(s)
        min_val = 0
        for key in d:
            if d[key] % 2:
                min_val += 1
        return min_val <= k <= max_val
    